home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
050
/
madtrb9.arc
/
BIOSREAD.INC
< prev
next >
Wrap
Text File
|
1984-07-13
|
1KB
|
46 lines
PROCEDURE biosread(VAR bx;dl:BYTE;dh:BYTE;ch:BYTE;cl:BYTE;al:BYTE);
{
JUNE 28, 1984
Author: Todd Little
1318 Bullock
Houston, TX 77055
713-984-2055 h
578-3210 w
}
{ This procedure allows a read on any diskette or hard disk sector
using the bios interrupt 13h.
The drive number is loaded in dl: 0,1,2,3 = a:,b:,c:,d: for diskettes,
80H = c: for hard disk
The side, track (cylinder), and sector are loaded in: dh,ch,cl
The number of sectors to read is passed in al
The data will be read into the storage location passed as bx
}
BEGIN
INLINE
( $8b/$5e/$10/ {mov bx,[bp+10] load the segment of 'bx'}
$8e/$c3/ {mov es,bx establish segment address}
$8b/$5e/$0e/ {mov bx,[bp+0e] bx: where the data goes}
$8a/$56/$0c/ {mov dl,[bp+0c] dl: drive number }
$8a/$76/$0a/ {mov dh,[bp+0a] dh side}
$8a/$6e/$08/ {mov ch,[bp+08] ch track}
$8a/$4e/$06/ {mov cl,[bp+06] cl sector}
$8a/$46/$04/ {mov al,[bp+04] al: number of sectors to read}
$b4/$02/ {mov ah,02 do a 'bios read'}
$cd/$13 {int 13h}
)
END;